package com.bosssoft.trainee.rbac.service.impl;

import com.bosssoft.trainee.rbac.dao.FunDao;
import com.bosssoft.trainee.rbac.entity.dto.FunsDTO;
import com.bosssoft.trainee.rbac.service.FunctionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FunctionServiceImpl implements FunctionService {
    @Autowired
    FunDao funDao;

    @Override
    public int updateFunction(FunsDTO funDTO) {
        return funDao.updateFunction(funDTO);
    }

    @Override
    public int insertFunction(FunsDTO funDTO) {
        return funDao.insertFunction(funDTO);
    }

    @Override
    public int deleteFunction(Integer menuId) {
        return funDao.deleteFunction(menuId);
    }

    @Override
    public List<FunsDTO> getFunctionByMenuId(Integer menuId) {
        return funDao.getFunctionByMenuId(menuId);
    }
}
